package cn.wzy.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * (Permission)实体类
 *
 * @author makejava
 * @since 2022-12-12 19:57:24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_role_permission")
public class Permission implements Serializable {
    
    private Long id;
    
    private String name;
    
    private String url;
    
    private String descs;
    
    private String sn;
    /**
     * 父级权限的id
     */
    private Long parent_id;

    @TableField(exist = false)
    private String parentName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date create_time;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    private Date update_time;

    @TableField(exist = false)
    private List<Permission> children;


}

